from interfaz_blue import interfaz_blue
import os.path
from Tkinter import *
#from PIL import Image, ImageTk
import os
import tkMessageBox
import codigo.core as core
import codigo.exportar_XML as cod 
import escoger_grupo

class App:
	
	def __init__(self, master):
		
		self.maestro=master
		frame = Frame(master, background="black")
		frame.pack()
        
        #image = Image.open("data/WolfTooth.jpg")
		#photo = ImageTk.PhotoImage(image)
		
	  	carpeta=core.darCarpetaData()
	  	#print carpeta
	  	ima= os.path.join(carpeta,"Wolftooth.GIF")
	  	photo = PhotoImage(file=ima)
	  	self.logo=Label(frame,image=photo)
	  	self.logo.image=photo
		self.logo.pack(side=TOP,fill=Y)      

		self.abre_blue = Button(frame, text="Bluetooth", fg="blue", command=self.abrir_blue)
		self.abre_blue.pack(side=LEFT,fill=X)

		self.abre_grupo = Button(frame, text="Grupos", command=self.abrir_grupos)
		self.abre_grupo.pack(side=LEFT, fill=X)


	def abrir_blue(self):
		self.maestro.quit()
		self.maestro.destroy()
		interfaz_blue()

	def abrir_grupos(self):
		escoger_grupo.escoger_grupo(True)
		


def interfaz():
	root = Tk()
	root.title("Campus Movil Pro - Asistencia")
	
	root.minsize(456,369)
	app = App(root)
	root.mainloop()

def tt():
	print "hola"
